{% extends "nomcom/nomcom_private_base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load django_bootstrap5 %}
{% block pagehead %}
    <link rel="stylesheet" href="{% static 'ietf/css/datepicker.css' %}">
{% endblock %}
{% block subtitle %}- Settings{% endblock %}
{% block nomcom_content %}
    {% origin %}
    <h2>Settings</h2>
    <form enctype="multipart/form-data" method="post" class="my-3">
        {% csrf_token %}
        {% bootstrap_form form %}
        <h3>Reminder Dates</h3>
        <p>
            If the "reminder interval" field of nomcom isn't filled, the following dates will be used to send reminders.
        </p>
        <p>
            The valid format: <strong>YYYY-MM-DD</strong>
        </p>
        {% bootstrap_formset formset %}
        <button class="btn btn-primary" type="submit">Save</button>
    </form>
{% endblock %}
{% block js %}
    <script src="{% static 'ietf/js/datepicker.js' %}"></script>
    <script>
        $('input[id*="reminderdates"][type="text"]').datepicker({
            format: "yyyy-mm-dd",
            todayBtn: "linked",
            todayHighlight: true
        }).wrap('<div class="input-group mb-3"></div>').parent().prepend('<span class="input-group-text"><i class="bi bi-calendar"></i></span>');
    </script>
{% endblock %}